/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package generovanieRozpisu;

/**
 *
 * @author Ondrej
 */
public class Id_zvysneHodiny implements Comparable<Id_zvysneHodiny>{
    
    private int id;
    private Double zvysneHodiny;

    /**
     *
     * @param id
     * @param zvysneHodiny
     */
    public Id_zvysneHodiny(int id, double zvysneHodiny) {
        this.id = id;
        this.zvysneHodiny = zvysneHodiny;
    }

    @Override
    public int compareTo(Id_zvysneHodiny o) {
        return this.getZvysneHodiny().compareTo(o.getZvysneHodiny());
    }

    /**
     * @return the id
     */
    public int getId() {
        return id;
    }

    /**
     * @return the zvysneHodiny
     */
    public Double getZvysneHodiny() {
        return zvysneHodiny;
    }
    
    public void updateHodiny(double kolkoOdrobil) {
        zvysneHodiny -= kolkoOdrobil;
//        if(zvysneHodiny < 0) {
//            zvysneHodiny = (double)0;
//        }
    }
}
